Dynomotion

Group: DynoMotion Message: 10253 From: ricochetproducts Date: 10/6/2014
Subject: Need Help With A Button

Tom,  I am having trouble programming a button,  It is for a manual tool change (tool release)

My Button is (1038) I want (149) (155) & (50) to come on when the button is pressed and to go off when the button is released.   I have it working as a toggle Press On / Press Off, I would like it to be momentary only.

I also don't want it to work if a program is running.  


I have not been able to find any examples yet.


Thanks,  Steve

Group: DynoMotion Message: 10254 From: engnerdan Date: 10/6/2014
Subject: Re: Need Help With A Button
I am sure there are many ways to do this but this is the simplest I could think of. 


If (ReadBit (1038))
{
SetBit (50);
SetBit (149);
SetBit (155);
}
else
{
ClearBit (50);
ClearBit (149);
ClearBit (155);
}

Sent from my Verizon Wireless 4G LTE smartphone


Group: DynoMotion Message: 10255 From: engnerdan Date: 10/6/2014
Subject: Re: Need Help With A Button
I forgot the exclusion if a job is running.

If (JOB_ACTIVE==0 &&ReadBit (1038))
{
SetBit (50);
SetBit (149);
SetBit (155);
}
else
{
ClearBit (50);
ClearBit (149);
ClearBit (155);
}

Sent from my Verizon Wireless 4G LTE smartphone


Group: DynoMotion Message: 10256 From: Steve Klemp Date: 10/6/2014
Subject: Re: Need Help With A Button
Hi Dan-
  Thanks I will give it a try!
 
.....Steve
            
 


On Monday, October 6, 2014 3:49 PM, "engnerdan engnerdan@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
I forgot the exclusion if a job is running.

If (JOB_ACTIVE==0 &&ReadBit (1038))
{
SetBit (50);
SetBit (149);
SetBit (155);
}
else
{
ClearBit (50);
ClearBit (149);
ClearBit (155);
}

Sent from my Verizon Wireless 4G LTE smartphone